Skip to content

Update analytics ecommerce event and param types #2728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 24, 2020
Merged

Conversation

hsubox76
Copy link
Contributor

@hsubox76 hsubox76 commented Mar 9, 2020

Update Analytics types and method signatures to reflect GA's enhanced ecommerce options.

  • Some events and params have been added.
  • Some have been deprecated.
  • Some existing methods have the number of suggested params expanded.

The latter should only affect IDE autocomplete. All event params are always optional and any additional arbitrary param is always allowed.

This changes the public API and will require a documentation update.

Internal bug for this feature: b/151107871

@@ -4477,6 +4526,14 @@ declare namespace firebase.analytics {
value?: number;
event_label?: string;
event_category: string;
shipping_tier?: string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The proposal only adds the following:

  // New suggested event parameters.
  shipping_tier?: string;
  item_list?: string;
  item_list_id?: string;
  payment_type?: string;

Where are the other ones defined?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

item_list is not present in the sheet. I think it has been replaced by item_list_name, see comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Mar 24, 2020

Binary Size Report

Affected SDKs

SDKTypeBase (9d593bc)Head (7d25023)Diff
@firebase/loggermodule?4778.00? (?)
esm2017?3223.00? (?)
main?5087.00? (?)
@firebase/storagemodule?62277.00? (?)
esm2017?56137.00? (?)
main?62483.00? (?)
@firebase/utilmodule?18551.00? (?)
browser?19454.00? (?)
esm2017?17369.00? (?)
main?19481.00? (?)
@firebase/appreact-native?9862.00? (?)
lite-esm2017?7748.00? (?)
module?11011.00? (?)
browser?11108.00? (?)
esm2017?9461.00? (?)
main?10105.00? (?)
lite?9102.00? (?)
@firebase/firestoremodule?271630.00? (?)
browser?275008.00? (?)
esm2017?271630.00? (?)
main?494047.00? (?)
@firebase/installationsmodule?21544.00? (?)
esm2017?16530.00? (?)
main?21995.00? (?)
@firebase/functionsmodule?8994.00? (?)
browser?9174.00? (?)
esm2017?7010.00? (?)
main?9209.00? (?)
@firebase/webchannel-wrappermodule?41226.00? (?)
main?40383.00? (?)
@firebase/performancemodule?24914.00? (?)
browser?25158.00? (?)
esm2017?23188.00? (?)
main?25158.00? (?)
firebasefirebase-installations.js?19436.00? (?)
firebase-storage.js?41262.00? (?)
firebase-messaging.js?39431.00? (?)
firebase.js?849069.00? (?)
firebase-auth.js?175057.00? (?)
firebase-analytics.js?26780.00? (?)
firebase-performance-standalone.js?46946.00? (?)
firebase-remote-config.js?37217.00? (?)
firebase-performance.js?37211.00? (?)
firebase-app.js?20008.00? (?)
firebase-firestore.js?315800.00? (?)
firebase-database.js?185548.00? (?)
firebase-performance-standalone.es2017.js?70398.00? (?)
firebase-functions.js?9642.00? (?)
@firebase/analyticsmodule?9371.00? (?)
esm2017?8682.00? (?)
main?9689.00? (?)
@firebase/authmodule?177089.00? (?)
main?177099.00? (?)
@firebase/remote-configmodule?22720.00? (?)
browser?23103.00? (?)
esm2017?17705.00? (?)
main?23103.00? (?)
@firebase/testingmain?6598.00? (?)
@firebase/messagingmodule?30549.00? (?)
esm2017?22806.00? (?)
main?31006.00? (?)
@firebase/databasemodule?264057.00? (?)
browser?265575.00? (?)
esm2017?232641.00? (?)
main?266339.00? (?)
@firebase/componentmodule?5046.00? (?)
browser?5164.00? (?)
esm2017?3898.00? (?)
main?5164.00? (?)
@firebase/polyfillmodule?666.00? (?)
main?733.00? (?)
Metric Unit: byte

Test Logs

@@ -4477,6 +4526,14 @@ declare namespace firebase.analytics {
value?: number;
event_label?: string;
event_category: string;
shipping_tier?: string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

item_list is not present in the sheet. I think it has been replaced by item_list_name, see comment.

@hsubox76 hsubox76 merged commit 1eada4e into master Mar 24, 2020
@hsubox76 hsubox76 deleted the ch-ecommerce branch April 3, 2020 18:54
@firebase firebase locked and limited conversation to collaborators Apr 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants